package com.hundsun.fmbp.deploy.utils;

public class CodeUtils {
    private static final int[] PASSWORD_MASK_ARRAY = new int[] { 19, 78, 10, 15, 100, 213, 43, 23 };

    public static String passwordEncode(String paramString) {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append("___");
        if (paramString == null) {
            return localStringBuilder.toString();
        }
        int i = 0;
        for (int j = 0; j < paramString.length(); j++) {
            if (i == PASSWORD_MASK_ARRAY.length) {
                i = 0;
            }
            int k = paramString.charAt(j) ^ PASSWORD_MASK_ARRAY[i];
            String str = Integer.toHexString(k);
            int m = str.length();
            for (int n = 0; n < 4 - m; n++) {
                str = "0" + str;
            }
            localStringBuilder.append(str);
            i++;
        }
        return localStringBuilder.toString();
    }
}
